var mongoose = require("../db.js");
var schema = mongoose.Schema; //模型生成器(表生成器)
//建立表 并且指定字段
var shareSchema = new schema({
    title: String,
    tag: String,
    coverUrl: String,
    targetUrl: String,
    top: Boolean,
    desc: String,
    createTime: String,
    readNum: {
        type: Number,
        default: 0,
    },
});

//转成数据模型导出
module.exports = mongoose.model("shareinfo", shareSchema);
